#include "stm32f10x.h" // Device header
#include "Delay.h"
#include "LED.h"
#include "tim2x.h"

int main(void)
{
	Delay_Init(72);
	LED_Init();
	PWM_Init(100 - 1, 7200 - 1);
	/*
		7200分频，72000000/7200 = 10000 = 10k,  1s计数1万
		定100Hz = 10ms， 10000/100 = 100
	*/
	PWM_Init(10 - 1, 7200 - 1); // 10000Hz / 1000Hz = 10

	while (1)
	{
		// TIM_SetCompare2(TIM2, 50);	//10ms 占空比50
		TIM_SetCompare2(TIM2, 2); // 10ms 占空比2
	}
}

/***********************************END OF FILE***********************************/
